#include "stm32f10x.h"                  // Device header
#include "Delay.h"
#include "OLED.h"
#include "MyFlash.h"
#include "Key.h"
#include "Store.h"

uint8_t i = 0;

int main(void)
{
	OLED_Init();
	Key_Init();
	Store_Init();
	for (i = 1; i <= 4; i++)
	{
		OLED_ShowHexNum(i, 1, SRAM_Data[i], 4);
	}
	while (1)
	{
		if (Key1_In())
		{
			Store_Save();
		}
		if (Key2_In())
		{
			for (i = 1; i <= 4; i++)
			{
				SRAM_Data[i]++;
				OLED_ShowHexNum(i, 1, SRAM_Data[i], 4);
			}
		}
	} 
}
